package entity

type Order struct {
	Id              int64   `gorm:"column:id;primary_key" json:"id"`
	OrderId         string  `gorm:"column:order_id;type:varchar(255);not null" json:"order_id"`
	CustomerId      string  `gorm:"column:customer_id;type:varchar(64);not null" json:"customer_id"`
	OrderDate       int64   `gorm:"column:order_date;type:bigint;not null" json:"order_date"`
	OrderStatus     int     `gorm:"column:order_status;type:integer;not null" json:"order_status"`
	TotalAmount     float64 `gorm:"column:total_amount;type:double;not null" json:"total_amount"`
	PaymentMethod   string  `gorm:"column:payment_method;type:varchar(255);not null" json:"payment_method"`
	ShippingAddress string  `gorm:"column:shipping_address;type:varchar(255);not null" json:"shipping_address"`
	Remarks         string  `gorm:"column:remarks;type:varchar(255);not null" json:"remarks"`
	OrderContext    string  `gorm:"column:order_context;type:varchar(1024);not null" json:"order_context"`
	ExtraData       string  `gorm:"column:extra_data;type:varchar(1024);not null" json:"extra_data"`
	CreatedAt       int64   `gorm:"column:created_at;type:bigint;not null" json:"created_at"`
	UpdatedAt       int64   `gorm:"column:updated_at;type:bigint;not null" json:"updated_at"`
}

func (o *Order) TableName() string {
	return "orders"
}
